<?php

class District extends Eloquent{
	protected $table = 'districts';
	public $timestamps = false;
	
	public function city(){
		$city = $this->belongsTo('City', 'city_id');
		return $city != null ? $city : null;
	}

	public function towns(){
		$towns = $this->hasMany('Town', 'district_id');
		return $towns != null ? $towns : null;
	}
}